<template>
  <div class="item-block item-block2">
    <div class="title">发票信息</div>
    <div class="line-con">
      <div class="label">发票类型：</div>
      <div class="line-detail" v-if="invoice_info.is_electronic == 1">电子{{invoice_info.type_content}}</div>
      <div class="line-detail" v-else>{{invoice_info.type_content}}</div>
    </div>
    <div v-if="invoice_info.type == 2">
      <div class="line-con">
        <div class="label">单位名称：</div>
        <div class="line-detail">{{invoice_info.invoice_header}}</div>
      </div>
      <div class="line-con">
        <div class="label">企业税号：</div>
        <div class="line-detail">{{invoice_info.invoice_no}}</div>
      </div>
      <div class="line-con">
        <div class="label">单位地址：</div>
        <div class="line-detail">{{invoice_info.company_address}}</div>
      </div>
      <div class="line-con">
        <div class="label">单位电话：</div>
        <div class="line-detail">{{invoice_info.company_phone}}</div>
      </div>
      <div class="line-con">
        <div class="label">开户银行：</div>
        <div class="line-detail">{{invoice_info.open_bank}}</div>
      </div>
      <div class="line-con">
        <div class="label">银行账户：</div>
        <div class="line-detail">{{invoice_info.bank_account}}</div>
      </div>
    </div>
    <div v-else>
      <div class="line-con">
        <div class="label">发票抬头：</div>
        <div class="line-detail">{{invoice_info.invoice_header}}</div>
      </div>
      <div class="line-con" v-if="invoice_info.mail">
        <div class="label">邮箱：</div>
        <div class="line-detail">{{invoice_info.mail}}</div>
      </div>
      <div class="line-con" v-if="invoice_info.invoice_no">
        <div class="label">企业税号：</div>
        <div class="line-detail">{{invoice_info.invoice_no}}</div>
      </div>
    </div>

    <div v-if="invoice_info.is_electronic == 1 && detailAll.detail.status == 3 && detailAll.detail.payment != 0">
      <div class="invoice-detail" @click="JumpName('eInvoice',{id:detailAll.detail.order_id})">电子发票（点击查看详情）</div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
export default Vue.extend({
  props: {
    detailAll: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  methods: {
    JumpName(url, data) {
      this.$JumpName(this, url, data)
    }
  },
  computed: {
    invoice_info() {
      return this.detailAll.invoice_info
    }
  }
})
</script>

<style lang="scss">
@import "src/styles/order/detail";
.invoice-detail{
  padding:10px 0;
  font-size:26px;
  color:#333;
}
</style>